#! /bin/bash
A=`ps -C nginx --no-header |wc -l`
if [ $A -eq 0 ];then
    /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    # systemctl start nginx.service
    sleep 2
    if [ `ps -C nginx --no-header |wc -l` -eq 0 ];then
        killall keepalived
        # service keepalived stop
    fi
fi
